﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GameEngineer.BaseMatrix
{
    //伸缩矩阵
    public class ScaleMatrix4X4 : Matrix4X4
    {
        private float mScaleX { get; set; }
        private float mScaleY { get; set; }
        private float mScaleZ { get; set; }
        private float mScaleW { get; set; }

        public ScaleMatrix4X4(float scaleX, float scaleY, float scaleZ, float scaleW)
        {
            this.mScaleX = scaleX;
            this.mScaleY = scaleY;
            this.mScaleZ = scaleZ;
            this.mScaleW = scaleW;

            Init();
        }

        //布置缩放矩阵数据
        public void Init()
        {
            this[0, 0] = mScaleX;
            this[1, 1] = mScaleY;
            this[2, 2] = mScaleZ;
            this[3, 3] = mScaleW;

            float[,] mMatrix = this.mMatrix;
        }

        //设置缩放矩阵的缩放比例
        public void SetScaleValue(float scaleX, float scaleY, float scaleZ, float scaleW)
        {
            this.mScaleX = scaleX;
            this.mScaleY = scaleY;
            this.mScaleZ = scaleZ;
            this.mScaleW = scaleW;
        }
    }
}
